import os
import gradio as gr
import autogpt

def autogpt_search(serpapi_key, openai_key, openai_model, question):
    out = autogpt.search_from_www(serpapi_key, openai_key, openai_model, question)
    return out

webui = gr.Interface(
    fn = autogpt_search,
    inputs = [
        'text', 'text', 'text', 'text'
    ],
    outputs=['text']
)

webui.launch()